import Http from '../../http';
import { formChange } from "../../../types/content";

export const getList = function (queryModel: any) {
    return Http.get('/content/index', queryModel)
}

export const getEdit = function (id: number) {
    return Http.get('/content/AddOrEdit', { id: id })
}
export const postAdd = function (from: any) {
    return Http.post('/content/Create', from)
}
export const putEdit = function (from: any) {
    return Http.put('/content/Edit', from)
}
export const delOne = function (id: number) {
    return Http.delete('/content/Delete', { id: id })
}

//编辑内容状态
export const switchValue = (form: formChange) => {
    return Http.put('/content/SwitchValue', form)
}